package br.com.bestOffer.converters;

import java.io.ByteArrayInputStream;
import java.io.IOException;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import org.primefaces.model.DefaultStreamedContent;
import org.primefaces.model.StreamedContent;



/**
 * @author Franklin Bourguignon
 *
 */
@ManagedBean
@ApplicationScoped
public class ImagemStreamer {

	public StreamedContent converterByte(byte[] arrayDeBits) throws IOException {
           return new DefaultStreamedContent(new ByteArrayInputStream(arrayDeBits));
        }

}